/*
#include<iostream>
using namespace std;
namespace fast
{
	template<class T>
	class vector
	{
	public:
		typedef T* iterator;
		typedef const T* const_iterator;
		void resize(iterator pos, T val = T());
		void erase();
	private:
		iterator _start;
		iterator _finish;
		iterator _end_of_storage;
	};
}
int main()
{

	return 0;
}
*/

#include<iostream>
#include<vector>
using namespace std;
void test()
{
	vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);
	v.push_back(5);
	v.push_back(6);
	vector<int>::iterator vit = v.begin();
	while (vit != v.end())
	{
		if (*vit % 2 == 0)
		{
			vit = v.erase(vit);
		}
		else
		{
			++vit;
		}
	}
	for (auto e : v)
	{
		cout << e << " ";
	}
	cout << endl;
}
int main()
{
	test();
	return 0;
}
